<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>会员中心-通过电子邮箱找回密码</title>
    <meta name="author" content="YzmCMS内容管理系统/QQ:214243830">
    <meta name="description" content="yzmcms,通过电子邮箱找回密码" />
    <link href="{STATIC_URL}css/yzm-member-reset.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="w1">
        <div class="w880 head">
            <div class="right"><a href="{SITE_URL}">回到首页</a></div>
            <a href="{U('member/index/register')}" class="current">注册</a> 欢迎登录
        </div>
    </div>
    <div class="main">
        <h1>通过电子邮箱找回密码</h1>
        <div class="main_left">
            <div class="title">
                <span>步骤：1. 确认账号 &nbsp;&nbsp;>&nbsp;&nbsp; 2.安全验证 &nbsp;&nbsp;>&nbsp;&nbsp; 3. 重置密码&nbsp;&nbsp;>&nbsp;&nbsp; 4. 成功</span>
            </div>
            <div class="form">
                {if $_SESSION['step'] == 1}
                <form method="post" action="">
                    <ul>
                        <li>注册邮箱：<input type="text" placeholder="电子邮箱" required name="email" class="input" /></li>
                        <li>验证码：<input type="text" placeholder="验证码" required name="code" class="input code" /><img src="{U('api/index/code')}" onclick="this.src=this.src+'?'" class="codeimg" title="看不清，换一张"></li>
                        <li><input type="submit" name="dosubmit" value="下一步" class="submit"> <a href="{U('init')}">重新选择验证方式</a></li>
                    </ul>
                </form>
                {elseif $_SESSION['step'] == 2}
                <form method="post" action="">
                    <ul>
                        <li><span class="red">我们已将校验码发送至您绑定的邮箱<strong style="color:#333;">{substr($_SESSION['email_arr'][0],0,3)} ****@{$_SESSION['email_arr'][1]} </strong>，请在下方输入完成验证</span></li>
                        <li>邮箱校验码：<input type="text" placeholder="邮箱校验码" required name="email_code" class="input code" /></li>
                        <li><input type="submit" name="dosubmit" value="下一步" class="submit"> <a onclick="history.go(-1)" href="javascript:void(0)">上一步</a></li>
                    </ul>
                </form>
                {else}
                <form method="post" action="" onsubmit="return checkall()">
                    <ul>
                        <li><span class="red">验证成功，请重新设定您的密码：</span></li>
                        <li>　　新密码：<input type="password" placeholder="新密码" required name="password" id="password" class="input" /></li>
                        <li>确认新密码：<input type="password" placeholder="确认新密码" required name="password2" id="password2" class="input" /></li>
                        <li><input type="submit" name="dosubmit" value="下一步" class="submit"></li>
                    </ul>
                </form>
                {/if}
            </div>
        </div>
        <div class="main_right">
            <p>已经有了账号？</p>
            <p>请直接登录</p>
            <br>
            <p><a href="{U('member/index/login')}" class="button">登录</a></p>
        </div>
    </div>
    <script type="text/javascript">
    function checkall() {
        var password = document.getElementById("password").value;
        var password2 = document.getElementById("password2").value;
        if (password.length < 6) {
            alert('密码不能低于6位！');
            return false;
        }
        if (password != password2) {
            alert('两次密码不一致！');
            return false;
        }
    }
    </script>
    <!--网站底部-->
    <div class="footer">
        <p>Powered by <a href="http://www.yzmcms.com" target="_blank">{YZMCMS_SOFTNAME}</a> © 2014-2023 版权所有</p>
    </div>
</body>

</html>